import React from 'react'
import { ReactGhLikeDiff } from 'react-gh-like-diff'
import 'react-gh-like-diff/lib/diff2html.min.css'

export default class DiffTopicModal extends React.Component {

  render () {
    const {source, diff = {}} = this.props
    return <ReactGhLikeDiff
      past={source.title}
      current={diff.title}
      options={{
        originalFileName: source.title,
        updatedFileName: diff.title,
        inputFormat: 'diff',
        outputFormat: 'side-by-side',
        showFiles: true,
        matchWordsThreshold: 0.25,
        matchingMaxComparisons: 2500
      }}
    />

  }
}